@import (reference) 'prop';

.ellipsis(@count-lines) when (@count-lines = 1) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ellipsis(@count-lines) when (@count-lines > 1) {
  .prop(-webkit-box-orient, vertical);
  .prop(-webkit-line-clamp, @count-lines);
  .prop(display, -webkit-box);

  overflow: hidden;
}
